﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Manager.master" AutoEventWireup="true" CodeFile="ManagementBrandDetail.aspx.cs" Inherits="EShop_ManagementBrandDetail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
 <%--<link href="<%= ResolveUrl("~/Styles/themes/base/ui.all.css")%>" rel="stylesheet" type="text/css" />--%>
    <%--<script src="<%= ResolveUrl("~/Scripts/ui.core.js")%>" type="text/javascript"></script>
    <script src="<%= ResolveUrl("~/Scripts/ui.accordion.js")%>" type="text/javascript"></script>
    <script src="<%= ResolveUrl("~/Scripts/ui.datepicker.js")%>" type="text/javascript"></script>--%>
    <script type="text/javascript">
        jQuery(function () {
            jQuery("#<%= txtDateCreate.ClientID %>").datepicker({ dateFormat: "dd/mm/yy" });
        });
        function CheckInput() {
            var objPhone = document.getElementById("<%=txtPhone.ClientID %>");
            var format_email = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
            var format_phone = /^[0-9]+$/;
            var format_website = /^(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,4}(:[\d]+)?(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/;

            if (jQuery("#<%= txtPhone.ClientID %>").val() != "") {
                if (!format_phone.test(jQuery("#<%= txtPhone.ClientID %>").val())) {
                    jQuery("#<%= txtPhone.ClientID %>").focus();
                    alert("Số điện thoại nhập không đúng.");
                    return false;
                }
            }
            if (jQuery("#<%= txtMobile.ClientID %>").val() != "") {
                if (!format_phone.test(jQuery("#<%= txtMobile.ClientID %>").val())) {
                    alert("Số điện thoại di động nhập không đúng.");
                    jQuery("#<%= txtMobile.ClientID %>").focus();
                    return false;
                }
            }
            if (jQuery("#<%= txtFax.ClientID %>").val() != "") {
                if (!format_phone.test(jQuery("#<%= txtFax.ClientID %>").val())) {
                    alert("Số fax nhập không đúng.");
                    jQuery("#<%= txtFax.ClientID %>").focus();
                    return false;
                }
            }
            if (jQuery("#<%= txtEmail.ClientID %>").val() != "") {
                if (!format_email.test(jQuery("#<%= txtEmail.ClientID %>").val())) {
                    alert("Email nhập không đúng định dạng.");
                    jQuery("#<%= txtEmail.ClientID %>").focus();
                    return false;
                } 
            }
            if (jQuery("#<%= txtWebsite.ClientID %>").val() != "") {
                if (!format_website.test(jQuery("#<%= txtWebsite.ClientID %>").val())) {
                    alert("Website nhập không đúng định dạng.");
                    jQuery("#<%= txtWebsite.ClientID %>").focus();
                    return false;
                }
            }
            
            try {
                var date_value = document.getElementById("<%=txtDateCreate.ClientID %>").value;
                jQuery.datepicker.parseDate("dd/mm/yy", date_value, null);
            }
            catch (error) {
                alert("Ngày nhập vào không đúng định dạng.");
                return false;
            }
            
            return false;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="content_area1">
        <h2>Chi Tiết Thương Hiệu</h2>
        <div style="padding-left: 30px; margin-bottom: 10px;"><asp:Label ID="lblMessage" runat="server" Visible="true" ForeColor="Red" Font-Size="15px" Text="Bạn không đủ điểm để nâng cấp VIP."></asp:Label></div>
        <div style="padding-left: 10px;">
            
            <div class="rows">
                <span class="leftrow">Tên thương hiệu:</span>
                <span class="rightrow">
                    <asp:TextBox ID="txtBrandName" runat="server"></asp:TextBox>
                    <asp:Label ID="lblBrandID" runat="server" Visible="false"></asp:Label>
                </span>
            </div>
            <br class="clear" />
            <div class="rows">
                <span class="leftrow">Loại thương hiệu:</span>
                <span class="rightrow"><asp:TextBox ID="txtCategoryJob" runat="server"></asp:TextBox></span>
            </div>
            <br class="clear" />
            <div class="rows">
                <span class="leftrow">Khách hàng:</span>
                <span class="rightrow"><asp:TextBox ID="txtCustomerBrand" runat="server"></asp:TextBox></span>
            </div>
            <br class="clear" />
           
            <div class="rows">
                <span class="leftrow">Điện thoại:</span>
                <span class="rightrow"><asp:TextBox ID="txtPhone" runat="server"></asp:TextBox></span>
            </div>
            <br class="clear" />
            <div class="rows">
                <span class="leftrow">Di động:</span>
                <span class="rightrow"><asp:TextBox ID="txtMobile" runat="server"></asp:TextBox></span>
            </div>
            <br class="clear" />
            <div class="rows">
                <span class="leftrow">Fax:</span>
                <span class="rightrow"><asp:TextBox ID="txtFax" runat="server"></asp:TextBox></span>
            </div>
            <br class="clear" />
            <div class="rows">
                <span class="leftrow">Email:</span>
                <span class="rightrow"><asp:TextBox ID="txtEmail" runat="server"></asp:TextBox></span>
            </div>
            <br class="clear" />
            <div class="rows">
                <span class="leftrow">Website:</span>
                <span class="rightrow"><asp:TextBox ID="txtWebsite" runat="server"></asp:TextBox></span>
            </div>
            <br class="clear" />
            <div class="rows">
                <span class="leftrow">Mã số thuế:</span>
                <span class="rightrow"><asp:TextBox ID="txtTaxCode" runat="server"></asp:TextBox></span>
            </div>
            <br class="clear" />
            <div class="rows">
                <span class="leftrow">Ngày tạo:</span>
                <span class="rightrow"><asp:TextBox ID="txtDateCreate" runat="server"></asp:TextBox></span>
            </div>
            <br class="clear" />
            <div class="rows">
                <span class="leftrow">&nbsp;</span>
                <span class="rightrow">
                    <asp:CheckBox ID="ckVip" runat="server" />&nbsp;VIP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:CheckBox ID="ckCheck" runat="server" />&nbsp;Check
                </span>
            </div>
            <br class="clear" />
            <div class="rows">
                <span class="leftrow">Địa chỉ:</span>
                <span class="rightrow"><asp:TextBox ID="txtAddress" runat="server"></asp:TextBox></span>
            </div>
            <br class="clear" />
            <div class="rows">
                <span class="leftrow">Thành phố:</span>
                <span class="rightrow"><asp:DropDownList ID="ddlCity" runat="server" Width="150px" AutoPostBack="true" OnSelectedIndexChanged="ddlCity_SelectedIndexChanged"></asp:DropDownList></span>
            </div>
            <br class="clear" />
            <div class="rows">
                <span class="leftrow">Quận:</span>
                <span class="rightrow"><asp:DropDownList ID="ddlDistrict" runat="server" Width="150px"></asp:DropDownList></span>
            </div>
            <br class="clear" />
            <div class="rows">
                <span class="leftrow">&nbsp;</span>
                <span class="rightrow">
                    <asp:Button ID="btnSave" runat="server" Text="Lưu" CssClass="buttonDefault form-submit" OnClick="btnSave_Click" OnClientClick="return CheckInput();"/>
                    <asp:Button ID="btnDelete" runat="server" Text="Xoá" CssClass="buttonDefault form-submit" OnClick="btnDelete_Click" OnClientClick="return confirm('Bạn thật sự có muốn xoá không ?')"/>
                </span>
            </div>
        </div>
        <br class="clear" />
        <img src="<%= ResolveUrl("~/images/bottom.jpg")%>" align="absbottom" alt="" />
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
</asp:Content>

